package com.yf1706.configuration;

import java.util.ArrayList;
import java.util.List;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.yf1706.interceptor.LoginInterceptor;

@Configuration
public class LoginConfigurer implements WebMvcConfigurer{
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		/*InterceptorRegistration reg =registry.addInterceptor(new LoginInterceptor());
		reg.addPathPatterns("/**");
		List<String> patterns=new ArrayList<String>();
		patterns.add("/log/**");
		patterns.add("/static/**");
		reg.excludePathPatterns(patterns);*/
	}
	
	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
	}
}
